import React from "react"
import {
	withState,
	withHandlers,
	compose,
	lifecycle
} from "recompose"
import {postParam, postJSON, get} from "server"
import {env, DEV} from "project-config"
import {message, Modal} from "antd"

const myShopCompose = compose(
	withState('_formData', '_setFormData', {}),
	withState('_shopData', '_setShopData', null),
	withHandlers({
		getShop: ({_setShopData}) => {
			return () => {
				get('/myShop').then(data => {
					_setShopData(data)
				})
			}
		}
	}),
	lifecycle({
		componentDidMount() {
			const {getShop} = this.props
			getShop()
		}
	})
)
export default myShopCompose